package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.system.dao.BabyMapper;
import com.bootdo.system.domain.BabyDO;
import com.bootdo.system.domain.BabyDO;
import com.bootdo.system.service.BabyService;
import com.github.pagehelper.PageHelper;



@Service("babyService")
public class BabyServiceImpl implements BabyService {
	@Autowired
	private BabyMapper babyMapper;
	
	@Override
	public BabyDO get(Long id){
		return babyMapper.get(id);
	}
	
	@Override
	public List<BabyDO> list(Map<String, Object> map){
		PageHelper.startPage(Integer.parseInt(map.get("pageNum").toString()),Integer.parseInt(map.get("pageSize").toString()));
		return babyMapper.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return babyMapper.count(map);
	}
	
	@Override
	public int save(BabyDO bComments){
		return babyMapper.save(bComments);
	}
	
	@Override
	public int update(BabyDO bComments){
		return babyMapper.update(bComments);
	}
	
	@Override
	public int remove(Long id){
		return babyMapper.remove(id);
	}
	
	@Override
	public int batchRemove( Integer[] ids){
		return babyMapper.batchRemove(ids);
	}

}
